package spring;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class StudentDaoI implements StudentDao {
    private Student s;
    private List<Student> list;
    public void setList(List<Student> list) {
        this.list = list;
    }
    //属性set
    public void setS(Student s) {
        this.s = s;
    }
    //构造方法
    public StudentDaoI() {}
    public StudentDaoI(Student s) {
        this.s = s;
    }

    public Student get() {
   /*     try {
            String str = "1999-10-12";
            //时间格式化对象
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            //把字符串转换为时间对象
            Date bir = sdf.parse(str);
            s.setBirthday(bir);
        }catch (Exception e){
            e.printStackTrace();
        }*/
        return s;
    }

    public List<Student> find() {
        list = new ArrayList();//创建对象
        list.add(s);
        return list;
    }
}
